Skip to content

Conversation

@makasim
Copy link
Member

@makasim makasim commented Nov 30, 2018

fixes #596

Queue from another AWS account

SQS allows to use queues from another account. You could set it globally for all queues via option queue_owner_aws_account_id or
per queue using SqsDestination::setQueueOwnerAWSAccountId method.

<?php
use Enqueue\Sqs\SqsConnectionFactory;

// globally for all queues
$factory = new SqsConnectionFactory('sqs:?queue_owner_aws_account_id=awsAccountId');

$context = (new SqsConnectionFactory('sqs:'))->createContext();

// per queue.
$queue = $context->createQueue('foo');
$queue->setQueueOwnerAWSAccountId('awsAccountId');

@makasim makasim merged commit da05a6a into master Nov 30, 2018
@makasim makasim deleted the sqs-use-queue-from-another-account branch November 30, 2018 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make SQSContext configurable

2 participants